import { http } from '@/utils/http/axios';

export interface CarouseInfo {
  id?: number;
  name: string;
  url: string;
}
/**
 * @description: 轮播图列表树
 */
export function getCarouselList() {
  return http.request({
    url: '/info/image',
    method: 'GET',
  });
}
/**
 * @description: 轮播图详情
 */
export function getCarouselInfo(params) {
  return http.request({
    url: '/info/image/info',
    method: 'GET',
    params,
  });
}
/**
 * @description: 轮播图新增
 */
export function createCarousel(data) {
  return http.request({
    url: '/info/image',
    method: 'POST',
    data,
  });
}
/**
 * @description: 轮播图修改
 */
export function updateCarousel(data) {
  return http.request({
    url: '/info/image',
    method: 'PUT',
    data,
  });
}
/**
 * @description: 删除轮播图
 */
export function deleteCarousel(params) {
  return http.request({
    url: '/info/image',
    method: 'DELETE',
    params,
  });
}
